*PURPOSE:	Replication Code for "The Aggregate Dynamics of Lower Court Responses to the U.S. Supreme Court."
*AUTHORS:	Ali S. Masood, Benjamin J. Kassow, and Donald R. Songer
*DATE:		12-27-2017

*Response Data through 2016
use "MKS_ReplicationData_JLC.dta" 

***********************************************************************************************************************
*Citation and Positive Treatment Models
menbreg num_citationsto2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 || majopinwriterterm:
menbreg num_positiveto2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 || majopinwriterterm:

*Summary Decisions
margins, predict(mu fixedonly) at (lnsummary2=(0 .6931472 1.098612 1.791759 2.484907) median_vitality16=.0708 margin= 5.869 altprec=0 decisiondirection=.427 nytsalience=0 criminal=0 numberoflegalprovisionsincase=1.179 opp2016=15.674 opp2_2016=253.806)

*Precedent Vitality
margins, predict(mu fixedonly) at (median_vitality16=(-3(1)3) lnsummary2=.254 margin= 5.869 altprec=0 decisiondirection=.427 nytsalience=0 criminal=0 numberoflegalprovisionsincase=1.179 opp2016=15.674 opp2_2016=253.806)

*Fractional Logistic Model
gen citationsandpositive2016 = num_positiveto2016+ num_citationsto2016
gen proportion2016 = num_positiveto2016/citationsandpositive2016
fracreg logit proportion2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016, vce(cluster majopinwriterterm)

*Models Excluding Large Number of Summary Decisions
menbreg num_citationsto2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 if num_summary2<10 || majopinwriterterm:
menbreg num_positiveto2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 if num_summary2<10 || majopinwriterterm:

*More Expansive CI Model including Lower Court Variables

*Citations
psmatch2 summarysignal, mahal(uncon decisiondirection criminal precedentAlteration numberoflegalprovisions margin dicho_consolidated term numberofissue unan reverse i.lcdisagreement) outcome(num_citationsto2016) caliper(10)
gen delta= num_citationsto2016 - _num_citationsto2016 if _treated==1 & _support==1
rbounds delta, gamma(1 (.1) 4) //Significant up to gamma 2.5
drop delta

*Positive Treatments
psmatch2 summarysignal, mahal(uncon decisiondirection precedentAlteration numberoflegalprovisions margin dicho_consolidated term numberofissue unan reverse i.lcdisagreement) outcome(num_positiveto2016) caliper(10)
gen delta= num_positiveto2016 - _num_positiveto2016 if _treated==1 & _support==1
rbounds delta, gamma(1 (.1) 4) //Significant up to gamma 2.5

*APPENDIX*

*Coarsened Exact Matching
cem uncon decisiondirection precedentAlteration numberoflegalprovisions(#3) margin(#2) dicho_consolidated term(#3) numberofissue(#3) unan reverse lcdisagreement, treat(summarysignal)
menbreg num_citationsto2016 i.summarysignal c.median_vitality16 threeyrlaghowmany margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 if cem_matched==1 || majopinwriterterm:
menbreg num_positiveto2016 i.summarysignal c.median_vitality16 threeyrlaghowmany margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 if cem_matched==1 || majopinwriterterm:

*Inclusion of Supreme Court Issue Area Docket Variable as Control
menbreg num_citationsto2016 c.lnsummary2 c.median_vitality16 threeyrlaghowmany margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 || majopinwriterterm:

*Inclusion of Supreme Court Issue Area Docket Variable-Positive Treatments
menbreg num_positiveto2016 c.lnsummary2 c.median_vitality16 threeyrlaghowmany margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 || majopinwriterterm:

*Criminal Case Only Models
menbreg num_citationsto2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase opp2016 opp2_2016 if criminal==1 || majopinwriterterm:
menbreg num_positiveto2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase opp2016 opp2_2016 if criminal==1 || majopinwriterterm:

*Non-Criminal Case Only Models
menbreg num_citationsto2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase opp2016 opp2_2016 if criminal==0 || majopinwriterterm:
menbreg num_positiveto2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase opp2016 opp2_2016 if criminal==0 || majopinwriterterm:

*Excluding All Cases With More Than One Summary Decision
menbreg num_citationsto2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 if num_summary2<2 || majopinwriterterm:
menbreg num_positiveto2016 c.lnsummary2 c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 if num_summary2<2 || majopinwriterterm:

*Excluding All Held Cases
menbreg num_citationsto2016 lnsummarydecisionsnotheld c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 || majopinwriterterm:
menbreg num_positiveto2016 lnsummarydecisionsnotheld c.median_vitality16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 || majopinwriterterm:

*Three-Year Vitality Measure
menbreg num_citationsto2016 c.lnsummary2 c.vitality3 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 || majopinwriterterm:
menbreg num_positiveto2016 c.lnsummary2 c.vitality3 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 || majopinwriterterm:

*Five-Year Vitality Measure
menbreg num_citationsto2016 c.lnsummary2 c.vitality5 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 || majopinwriterterm:
menbreg num_positiveto2016 c.lnsummary2 c.vitality5 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016 || majopinwriterterm:

*Proportional Negative Treatment Model
gen proportionnegative2016=num_negativeto2016 / (num_negativeto2016+num_citationsto2016)
fracreg logit proportionnegative2016 c.lnsummary2 c.medvital16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016, vce(cluster majopinwriterterm)

gen propnegativedist2016=nnegativedist2016 / (nnegativedist2016+num_citationsto2016)
fracreg logit propnegativedist2016 c.lnsummary2 c.medvital16 margin altprec nytsalience decisiondirection numberoflegalprovisionsincase criminal opp2016 opp2_2016, vce(cluster majopinwriterterm)

